Skip to content

db-ai-bridge: Add hostname resolution support for Lakebase Pool#310

Open
jennsun wants to merge 2 commits intomainfrom
lakebase-accept-instance-name
Open

db-ai-bridge: Add hostname resolution support for Lakebase Pool#310
jennsun wants to merge 2 commits intomainfrom
lakebase-accept-instance-name

Conversation

@jennsun
Copy link
Contributor

@jennsun jennsun commented Jan 30, 2026

Allow LakebasePool to accept either instance name or hostname. When a hostname is provided (detected by .database. pattern), it resolves to the instance name by listing database instances.

This would support cases like when Databricks Apps resolves to hostname using resource reference (valueFrom in app.yaml)

conversation thread from prev PR: #274 (comment)

@jennsun jennsun changed the title Add hostname resolution support for Lakebase Pool db-ai-bridge: Add hostname resolution support for Lakebase Pool Jan 30, 2026
@jennsun jennsun marked this pull request as ready for review January 30, 2026 23:56
@jennsun jennsun requested a review from bbqiu January 30, 2026 23:56
resolved_host = getattr(instance, "read_write_dns", None) or getattr(
instance, "read_only_dns", None
)
# If input is hostname (e.g., from Databricks Apps valueFrom resolution)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense to have the helper inside of this method?

i think if the method here is accepting a param "instance name", then this might be a helpful standalone helper? something that will resolve to a validated instance name, whether given a hostname or an instance name

@@ -1056,3 +1056,104 @@ def test_execute_grant_handles_insufficient_privilege(self):
error_msg = str(exc_info.value)
assert "Insufficient privileges" in error_msg
assert "CAN MANAGE" in error_msg
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add an integration test where we use real values from dogfood to verify this logic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants